package com.game.matchingsystem.controller;


import com.game.matchingsystem.service.MatchingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/matching")
public class MatchingController {
    @Autowired
    private MatchingService matchingService;

    @RequestMapping("/add")
    public String addPlayer(@RequestParam(value = "user_id") Integer userId,@RequestParam(value="bot_id") Integer botId, Integer rating){
        return matchingService.addPlayer(userId,botId,rating);
    }

    @RequestMapping("/remove")
    public String removePlayer(@RequestParam(value = "user_id") Integer userId){
        return matchingService.removePlayer(userId);
    }
}
